home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / program / readme12.arc / MENU.TRB next >
Text File  |  1988-06-29  |  6KB  |  281 lines

  1. *      SAMPLE MENU TREE FOR POPHELP (Todd Burkey/5-30-88)      */
  2. /* menu for level 0 help */
  3. #:0
  4. X:20
  5. Y:2
  6. T:    POPHELP By Todd Burkey
  7. T:
  8. T:Uh-oh. You need HELP for POPHELP?
  9. T:OK, the first thing to remember is
  10. T:that in POPHELP, you really only
  11. T:need to use the four arrow keys
  12. T:and the ESC key. The up and down
  13. T:arrows will move you up and down in
  14. T:the current pop-up...but only when
  15. T:there is selectable (blue) text in
  16. T:the popup. Note that this popup has
  17. T:NO selectable text...you can just
  18. T:read it and exit. Which brings us
  19. T:to the left and right arrow keys.
  20. T:The right key gets you into a menu,
  21. T:while the left key moves you back
  22. T:out of a menu. The ESC key? It gets
  23. T:you out of the popups altogether.
  24. T:You can press the LEFT ARROW now.
  25. #:1
  26. X:5
  27. Y:15
  28. T:WELCOME TO POPHELP
  29. +:HELP ON POPHELP   
  30. =:3
  31. +:POPHELP MANIFESTO 
  32. =:40
  33. +:Who made this mess
  34. =:41
  35. +:ABOUT README      
  36. =:50
  37. +:Some Error Testing
  38. =:42
  39. +:Other menu #4     
  40. =:4
  41. +:Other Menu #6     
  42. =:6
  43.  
  44. #:50
  45. X:4
  46. Y:4
  47. 1:530
  48. T:README is a generic application that I hope you find useful in setting
  49. T:up useful on-line documentation for programs you develop. Feel free to
  50. T:give out copies of README to others who are learning C or who you feel
  51. T:could use a better help mechanism. I will try to keep the pophelp file
  52. T:formats upwards compatible, so keep your eyes open for future releases
  53. T:of improved versions of this program.
  54.  
  55. #:40
  56. X:2
  57. Y:4
  58. T:This program shows one use of the POPHELP mechanism (Copyright 1988 by
  59. T:Todd Burkey). POPHELP is intended to be a 'clean' way of presenting help
  60. T:to users of a program and was also written to demonstrate in source code
  61. T:how to do those confusing linea/vdi/etc things that all of our books kind
  62. T:of gloss over. I am not saying that my methods are proper coding or even
  63. T:close, but at least it works. In order to ensure that this code and the
  64. T:techniques involved stay accessible to the public at large, I have to
  65. T:make the following stipulations:
  66. T: 
  67. T: 1) This program and source code may be freely distributed as long as no
  68. T:    profits are made in the process (Club Disks of the Month and BBSs are
  69. T:    excepted, of course.)
  70. T: 2) All derivatives of the routines in this code must include this notice
  71. T:    verbatim and are similarly subject to the conditions in 1, above.
  72. T: 3) No warrantees are made as to the usefulness or safety of using this
  73. T:    code. The user uses it at his/her own risk.
  74.  
  75. #:41
  76. 1:030
  77. 2:540
  78. X:14
  79. Y:15
  80. T: Todd Burkey                 A member of STdNET
  81. T: 3546 Pilgrim Lane        The ST developers' Network 
  82. T: Plymouth, MN 55441            (trb@stag.UUCP)
  83.  
  84. #:42
  85. X:10
  86. Y:6
  87. T:  SIMPLE TESTING  
  88. +:Look at sample.txt
  89. =:10
  90. +:Look at bad file  
  91. =:11
  92. +:Open Menu >100    
  93. =:120
  94. +:Menu Doesn't exist
  95. =:88
  96. +:Goto myself (loop)
  97. =:42
  98.  
  99. /* Real help for POPHELP */
  100. #:3
  101. X:12
  102. Y:8
  103. T:GETTING STARTED
  104. +:Moving Around  
  105. =:22
  106. +:Some Comments  
  107. =:23
  108. +:Technical Info 
  109. =:26
  110.  
  111. #:26
  112. X:30
  113. Y:10
  114. +:MENU.TRB Format
  115. =:27
  116. +:COLOR Tables   
  117. =:28
  118.  
  119. #:27
  120. X:3
  121. Y:4
  122. T:The file MENU.TRB is processed by POPHELP's build_menu routine and
  123. T:drives the entire menu structure of POPHELP. The format of MENU.TRB
  124. T:is very simple. For example, the following is a sample 2 level menu
  125. T:with comments (note the comments can't really be part of the line):
  126. T:#:1             <-we are defining menu # 1
  127. T:X:10            <-the popup box will start at cursor column 10
  128. T:Y:4             <-and at cursor row number 4
  129. T:T:WELCOME       <-just some text to put in red (color #1)
  130. T:+:More Help     <-text for another menu selection
  131. T:=:2             <-go to menu 2 when the above text is selected
  132. T:#:2             <-all done with menu 1, so lets define menu 2 now
  133. T:X:5             <-new coordinates
  134. T:Y:6             <-new coordinates
  135. T:1:070           <-redefine color 1 (the text) to be green (RGB)
  136. T:<:afile.txt     <-menu 2 popup text is read from a file 
  137.  
  138. #:60
  139. X:20
  140. Y:8
  141. 1:530
  142. 2:053
  143. T:For RGB users only 
  144. T:  You were warned  
  145. +:Some soft colors   
  146. =:61
  147. +:Some Putrid ones   
  148. =:62
  149. +:Late night colors  
  150. =:63
  151.  
  152. #:61
  153. X:5
  154. Y:3
  155. 0:054
  156. 1:410
  157. 2:046
  158. 3:222
  159. T:Pastels?
  160. T:0:054
  161. T:1:500
  162. T:2:066
  163. T:3:333
  164.  
  165. #:62
  166. X:5
  167. Y:3
  168. 0:070
  169. 1:770
  170. 2:077
  171. 3:707
  172. T:Putrid
  173. T:0:070
  174. T:1:770
  175. T:2:077
  176. T:3:707
  177.  
  178. #:63
  179. X:5
  180. Y:3
  181. 0:000
  182. 1:700
  183. 2:007
  184. 3:770
  185. T:Brighter
  186. T:0:000
  187. T:1:700
  188. T:2:007
  189. T:3:770
  190.  
  191. #:28
  192. X:2
  193. Y:4
  194. T:Colors can be changed from the default setup dynamically within the menus,
  195. T:but extreme care should be taken so you don't screw things up for people
  196. T:who use monochrome monitors. The technique is quite simple. Within the
  197. T:MENU.TRB file, include the following fields when you want a new color:
  198. T:0:006          <--change color 0 to light blue (normal background)
  199. T:1:600          <--change color 1 to red (non-selectable text)
  200. T:2:000          <--change color 2 to black (for the shadow)
  201. T:3:775          <--change color 3 to off white (popup background).
  202. T:Note that the default color can be over-ridden by specifying a new color
  203. T:for menu # 1 (the first popup that is displayed by POPHELP).
  204. +:Some sample colors maps.
  205. =:60
  206.  
  207. #:22
  208. X:14
  209. Y:10
  210. +:ARROW KEYS 
  211. =:24
  212. +:HOW TO QUIT
  213. =:25
  214.  
  215. #:25
  216. X:40
  217. Y:12
  218. T:1) Press the ESC key.  This takes
  219. T:   you out of the help selection.
  220. T:2) Press the Q (not q) key. This
  221. T:   exits you from the demo.
  222.  
  223. #:24
  224. X:30
  225. Y:12
  226. T:RIGHT ARROW = Select the hilited menu  
  227. T:LEFT ARROW  = Move to menu we came from
  228. T:UP ARROW    = Move up in the menu list 
  229. T:DOWN ARROW  = Move down in the list    
  230.  
  231. #:23
  232. X:15
  233. Y:11
  234. T:POPHELP is a simple, but clean, mechanism
  235. T:for both externalized and internally held
  236. T:help information. It was written only for
  237. T:fun, but may prove useful in standardized
  238. T:help utilities as its' features are tuned
  239. T:up and refined.  Any comments from anyone
  240. T:out there? Or is this idea just too wierd
  241. T:and far-fetched.
  242.  
  243. /* lower level menu that is all text */
  244. #:4
  245. X:30
  246. Y:14
  247. T:This is all Text, so you
  248. T:can't really do much but
  249. T:look at it and then push
  250. T:the left arrow key.     
  251.  
  252. /* small menu */
  253. #:6
  254. X:50
  255. Y:3
  256. T:Menu 6
  257. +:GOTO 5
  258. =:5
  259. +:GOTO 1
  260. =:1
  261.  
  262. /* menu that is really a file */
  263. #:10
  264. X:3
  265. Y:5
  266. <:sample.txt
  267.  
  268. /* just a test to show what a missing file will do */
  269. #:11
  270. X:3
  271. Y:5
  272. <:hl.txt
  273.  
  274. /* another little text menu */
  275. #:5
  276. X:70
  277. Y:20
  278. T:JUST
  279. T:MORE
  280. T:Text
  281.